# Packages ----------------------------------------------------------------# using a reproducible environmentrenv::restore()# pacman allows to check/install/load packages with a single call# if (!require("pacman")) install.packages("pacman") # already in renv.locklibrary("pacman")# packages to load (and install if needed) -------------------------------pacman::p_load( here, # easy file paths see, # theme_modern and okabeito palette report, # reporting various info labelled, # labelled data# ---- packages specific to this project ---- scales, lme4, car, simr, readxl, openxlsx, statmod, qqplotr, emmeans, latex2exp, ggbeeswarm, ggpubr, patchwork, quarto, easystats,# --- tidyverse # modern R ecosystem)# Custom functions shared across scripts ----------------------------------source(here("scripts/_functions.R"))# Global cosmetic theme ---------------------------------------------------theme_set(theme_modern(base_size =14)) # from see in easystats# setting my favourite palettes as ggplot2 defaultsoptions( ggplot2.discrete.colour = scale_colour_okabeito,ggplot2.discrete.fill = scale_fill_okabeito,ggplot2.continuous.colour = scale_colour_viridis_c,ggplot2.continuous.fill = scale_fill_viridis_c)# Fixing a seed for reproducibility ---------------------------------------set.seed(14051998)# Adding all packages' citations to a .bib --------------------------------knitr::write_bib(c(.packages()), file =here("bibliography/packages.bib"))
Table S2.4: Estimated probability of a correct answer and log-odds contrasts between groups for the accuracy in the explicit task.
Estimated Marginal Means
aphantasia
Probability
SE
95% CI
Control
0.98
3.37e-03
(0.97, 0.99)
Aphantasia
0.98
2.40e-03
(0.98, 0.99)
Marginal means estimated at aphantasia
Marginal Contrasts Analysis
Level1
Level2
Odds ratio
95% CI
SE
df
z
p
Control
Aphantasia
0.81
(0.54, 1.21)
0.17
Inf
-1.03
0.304
Marginal contrasts estimated at aphantasia p-values are uncorrected.
3 Response Times analyses
3.1 Rationale
To account for the non-normal, positively skewed distributions of the RTs, we fitted Generalized Linear Mixed Models (GLMMs) with inverse Gaussian distributions. The models were implemented in the lme4 R package and integrated in tidymodels workflows using the package multilevelmod. Models with Gamma and Gaussian distributions were also fitted and compared with the AIC and BIC to ensure that we chose the best distribution available.
The models included the Group (aphantasic, control), Congruence condition (congruent or incongruent) and Color condition (color or uncolored) along with all their two and three way interactions as fixed categorical predictors, while participants have been included as grouping factors (i.e. “random effects”). The random effect structure was chosen by fitting and comparing models with every possible combination of distribution and structure (intercept by participant, congruence or color, slope by participant on congruence and/or color) aiming for the best balance between goodness of fit and parsimony. Complex random-effects structures including various slopes on the factors failed to converge to stable and reliable estimates, hence the optimal models chosen included a single by-participant random intercept.
3.2 Model fitting
The formula of the model fitted is \(RT \sim (aphantasia + congruence + color)^3 + (1|subjectid)\).
Figure 1.1: Figure S3.1: Model assumption checks for the Generalized Linear Mixed Model fit on the RTs in the implicit task.Figure S3.2: Model assumption checks for the Generalized Linear Mixed Model fit on the RTs in the explicit task.Figure 3.1: Subject means and model-estimated means per group and condition in the implicit task.Figure 3.2: Subject means and model-estimated means per group and condition in the explicit task.